
<div class="user_bg ajax_reg">
	<div class="login-bg">
			<div class="login-header">
				<img width="100%" src="{$_C.hy_path}images/login-header.png"/>
			</div>
			<div class="login-body">
				<div class="login-logo login-fl">
					<div class="login-logo-container">
						<img  width="100%" src="{$_C.hy_path}images/login-logo.jpg"/>
					</div>
					
				</div>
			<div class="reg-input login-fl">
				<p>{$_L.PLEASE_INPUT}：</p>
				<div>
					<div style="width: 20%;" class="login-fl">
						{$_L.PHONE}:
					</div>
					<div style="width: 70%;"  class="login-fl">
						<div class="login-input-bg">
							<input type="text" name="phone" id="phone" value="" />
						</div>
					</div>
				</div>
				<div style="clear: both;height: 10px;">
					
				</div>
				<div>
					<div style="width: 20%;" class="login-fl">
						{$_L.REAL_NAME}:
					</div>
					<div style="width: 70%;"  class="login-fl">
						<div class="login-input-bg">
							<input type="text" name="username" id="username" value="" />
						</div>
					</div>
				</div>
				<div style="clear: both;height: 10px;">
					
				</div>
				<div>
					<div style="width: 20%;" class="login-fl">
						{$_L.SHOP_AREA}:
					</div>
					<div style="width: 70%;"  class="login-fl">
						<div class="login-input-bg">
							<select style =" width:100%" name="shoparea" id="shoparea">
        <option value="0">请选择</option>
                <option value="2">北京</option>
                <option value="3">安徽</option>
                <option value="4">福建</option>
                <option value="5">甘肃</option>
                <option value="6" selected="">广东</option>
                <option value="7">广西</option>
                <option value="8">贵州</option>
                <option value="9">海南</option>
                <option value="10">河北</option>
                <option value="11">河南</option>
                <option value="12">黑龙江</option>
                <option value="13">湖北</option>
                <option value="14">湖南</option>
                <option value="15">吉林</option>
                <option value="16">江苏</option>
                <option value="17">江西</option>
                <option value="18">辽宁</option>
                <option value="19">内蒙古</option>
                <option value="20">宁夏</option>
                <option value="21">青海</option>
                <option value="22">山东</option>
                <option value="23">山西</option>
                <option value="24">陕西</option>
                <option value="25">上海</option>
                <option value="26">四川</option>
                <option value="27">天津</option>
                <option value="28">西藏</option>
                <option value="29">新疆</option>
                <option value="30">云南</option>
                <option value="31">浙江</option>
                <option value="32">重庆</option>
                <option value="33">香港</option>
                <option value="34">澳门</option>
                <option value="35">台湾</option>
              </select>
						</div>
					</div>
				</div>
				<div style="clear: both;height: 10px;">
					
				</div>
				<div>
					<div style="width: 20%;" class="login-fl">
						{$_L.SHOP_NAME}:
					</div>
					<div style="width: 70%;"  class="login-fl">
						<div class="login-input-bg">
							<input type="text" name="shopname" id="shopname" value="" />
						</div>
					</div>
				</div>
				<div style="clear: both;height: 10px;">
					
				</div>
				<div>
					<div style="width: 20%;" class="login-fl">
						{$_L.MONEY}:
					</div>
					<div style="width: 70%;"  class="login-fl">
						<div class="login-input-bg">
							<input type="text" name="money" id="money" value="" />
						</div>
					</div>
				</div>
				<div style="clear: both;height: 10px;">
					
				</div>
				<div>
					<div style="width: 20%;" class="login-fl">
						{$_L.PIECE_NUM}:
					</div>
					<div style="width: 70%;"  class="login-fl">
						<div class="login-input-bg">
							<input type="text" name="piece_num" id="piece_num" value="" />
						</div>
					</div>
				</div>
				<div style="clear: both;height: 10px;">
					
				</div>
				
				
				<div>
					<div style="width: 20%;" class="login-fl">
						{$_L.PWD}:
					</div>
					<div style="width: 70%;"  class="login-fl">
						<div class="login-input-bg">
							<input placeholder="置空则默认为手机号码后四位" type="password" name="password" id="password" value="" />
						</div>
					</div>
				</div>
				<div style="clear: both;height: 10px;">
					
				</div>
				<div>
					<div style="width: 20%;" class="login-fl">
						{$_L.CONFIRM_PWD}:
					</div>
					<div style="width: 70%;"  class="login-fl">
						<div class="login-input-bg">
							<input type="password" name="confirm" id="confirm" value="" />
						</div>
					</div>
				</div>
				<div style="clear: both;height: 10px;">
					
				</div>
				<div class="login-ctrl">
						<a  href="javascript:;" class="reg-btn"><span>{$_L.REG}</span></a>
						
							<a href="javascript:;" class="cancel-btn"><span>{$_L.BACK}|</span></a>
				</div>
			</div>
			</div>
		</div>
		
</div>
<script>
	$('.cancel-btn').click(function(e){
		$('.user_bg').hide()
		});
	
	$('.reg-btn').click(function(e){ 
      e.preventDefault();	
	  var username=$('#username').val();
	  var phone=$('#phone').val();
	  var shopname=$('#shopname').val();
	  var shoparea=$('#shoparea').val();
	  var confirm=$('#confirm').val();
	  var piece_num=$('#piece_num').val();
	  var money=$('#money').val();
      var pwd=$('#password').val();
if(confirm!=pwd)
{
	alert('两次密码填写不正确');
}
		$.post('/index.php?g=home&m=user&a=act_reg',{
			"phone":phone,
			"shopname":shopname,
			"shoparea":shoparea,
			"piece_num":piece_num,
			"money":money,
			"pwd":pwd,
			"realname":username
			},function(result)
	{ 
	
		
	if(result.error==0)
	{
		alert(result.content);
		if(result.url)
		{
	    	window.location.href=result.url;
		}
		else
		{
			window.location.href='index.html';
		}
	}
	else{
		alert(result.content);
	}
		},'json');
		
		})
	
	
    </script>